Applicable to:
- cPanel & WHM for Linux
Symptoms
When validating a Google Drive backup destination in WHM, you receive an error similar to the following:
PRODUCT_ERROR: Validation for transport "GoogleDrive" failed: Could not create path directory "/BackupFolder/": api_test failed at /usr/local/cpanel/3rdparty/perl/542/cpanel-lib/Net/Google/Drive/Simple/Core.pm line 77
Note: On older versions of cPanel & WHM, the path in the error may reference Net/Google/Drive/Simple.pm instead of Net/Google/Drive/Simple/Core.pm.
Cause and Resolution
Cause: The Google Drive API quota for the associated Google Cloud project is configured too low, causing API requests from the cPanel backup transport to be rate-limited before the directory creation call completes.
Google Drive API quotas are enforced in quota units per minute. The current default limits are:
| Quota type | Default limit |
|---|---|
| Per minute per project | 1,000,000 quota units |
| Per minute per user per project | 325,000 quota units |
Each API call consumes quota units based on the method used. Listing files (files.list) costs 100 quota units per call; reading file metadata (files.get) costs 5.
Resolution:
- Log into the Google Cloud Console.
- Navigate to APIs & Services > Enabled APIs & Services > Google Drive API > Quotas & System Limits.
- Review your current quota usage. If the per-minute-per-user limit is being exceeded, submit a quota increase request from this page.
- Once the adjustment is approved, re-validate the backup destination in WHM.
Note: Quota increase requests are reviewed by Google and are not guaranteed to be approved. Requests for significant increases may take longer to process.
Cause: The server has both IPv4 and IPv6 addresses configured, but IPv6 connectivity to Google's API endpoints is broken or blackholed at the network level. The cPanel backup transport uses a Perl networking library that prefers IPv6 when both address families are available. When IPv6 cannot reach Google, every connection attempt times out before the library falls back to IPv4, producing the validation error above. The same credentials may work correctly on other servers where IPv6 is absent or fully functional.
To confirm this is the cause, run the following command and check whether it times out:
# curl -6 -v https://www.googleapis.com/ --max-time 10
If this command times out or fails while the server can reach Google normally over IPv4, IPv6 egress from the server to Google is broken.
Resolution:
- Log into the server via SSH.
- Create a backup copy of the file:
# cp -a /etc/gai.conf /etc/gai.conf.bak
- Open
/etc/gai.confin a text editor. If the file does not exist, create it. Add the following line:CONFIG_TEXT: precedence ::ffff:0:0/96 100
- Save the file. No restart is required; the change takes effect immediately for all new connections.
- Re-validate the backup destination in WHM.
Note: This configures the system resolver to prefer IPv4-mapped addresses when both address families are available. IPv6 is not disabled; services that resolve only to IPv6 addresses are unaffected.
Additional Information
- Google Drive API: Usage Limits — Current quota types, per-method quota unit costs, and instructions for requesting a quota increase from Google.
- cPanel & WHM Documentation: How to Configure Google Drive as a Backup Additional Destination
Comments
0 comments
Article is closed for comments.